package com.prs.crm.domain.doc;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.prs.crm.domain.FlowCodeEntity;
@Entity
@Table(name="doc_deptdoc_type")
public class DeptDocType extends FlowCodeEntity{

	private static final long serialVersionUID = -8148256415530888431L;
	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	private String name;
	private String deptdoctypecode;
	@ManyToOne
	private DeptDocType deptDocType;
	@OneToMany(fetch=FetchType.LAZY,mappedBy="deptDocType",cascade={CascadeType.ALL})
	private Set<DeptDocType> childs;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public DeptDocType getDeptDocType() {
		return deptDocType;
	}
	public void setDeptDocType(DeptDocType deptDocType) {
		this.deptDocType = deptDocType;
	}
	public Set<DeptDocType> getChilds() {
		return childs;
	}
	public void setChilds(Set<DeptDocType> childs) {
		this.childs = childs;
	}
	public String getDeptdoctypecode() {
		return deptdoctypecode;
	}
	public void setDeptdoctypecode(String deptdoctypecode) {
		this.deptdoctypecode = deptdoctypecode;
	}
	public static long getSerialVersionUID() {
		return serialVersionUID;
	}
	
	
}
